#ifndef PCAgent_COMMON_SECURITY_RC4_H__
#define PCAgent_COMMON_SECURITY_RC4_H__

#include "inttypes.h"

#ifdef __cplusplus
extern "C" {
#endif

	typedef struct {
		uint8_t S[256];
		uint8_t i;
		uint8_t j;
	} RC4_CTX;

	void RC4_setKey(RC4_CTX* ctx, const uint8_t* data, int len);
	void RC4_discard(RC4_CTX* ctx, int len);
	void RC4_crypt(RC4_CTX* ctx, const uint8_t* in, uint8_t* out, int len);
	void RC4_stream(RC4_CTX* ctx, uint8_t* out, int len);

#ifdef __cplusplus
}
#endif

#endif  // PCAgent_COMMON_SECURITY_RC4_H__